#
# The traffic processor.
#
# Development by Sedelnikov Alexander (Bigking).
#
TARGET=trfprc

INCS=-I./ -I./confuse-254/src -I./zlib/src \
	  -I/D/_dev/_db/PGSQL836/include
#     -I/usr/include/postgresql

LIBS=-L./confuse-254/lib -L./zlib/lib -lconfuse -lzlib -lpthread -lpsapi \
	  -L/D/_dev/_db/PGSQL836/lib

#CPP_FLAGS=
CPP_FLAGS=-O3 -ftree-vectorize -ftree-dominator-opts \
	  -freg-struct-return
#          -DPOSTGRES

LD_FLAGS=


HDRS=common.h \
	thread.h \
	log.h \
	hashtbl/htbl.h \
	conf.h \
	trf_parser.h \
	ipacc3_parser.h \
	processor.h \
	job_manager.h \
	out.h \
	transact.h


OBJS=tp.o \
	common.o \
	thread.o \
	log.o \
	conf.o \
	trf_parser.o \
	ipacc3_parser.o \
	processor.o \
	job_manager.o \
	out.o \
	transact.o


all: $(TARGET)


clean:
	rm -f ./*.o
	rm -f $(TARGET)


recompile: clean all


$(TARGET): $(OBJS)
	g++ $(LD_FLAGS) -o $(TARGET) $(OBJS) $(LIBS)


$(OBJS): $(HDRS)


.cpp.o:
	g++ $(CPP_FLAGS) -c $< -o $@ $(INCS)


.PHONY: all clean recompile
